package com.qzsoft.system.modules.permission.deptJob.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qzsoft.system.modules.permission.user.dto.UserDept;
import com.qzsoft.system.modules.permission.user.dto.UserJob;
import com.qzsoft.system.repository.sys.entity.SysDeptEntity;
import com.qzsoft.system.repository.sys.entity.SysUserDeptEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (SysUserDept)表数据库访问层
 *
 * @author yzz
 * @since 2020-07-30 09:43:10
 */
@Mapper
public interface SysUserDeptMapper extends BaseMapper<SysUserDeptEntity> {

    void delete(SysUserDeptEntity entity);

    UserDept getMainDeptByUsername(String username);

    List<UserDept> getSubDeptByUsername(String username);

    UserJob getMainJobByUsername(String username);

    List<UserJob> getSubJobByUsername(String username);

    int updateBatchByDeptCode(@Param("list") List<SysDeptEntity> list);
}